﻿using System;
using System.Collections.Generic;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Guest : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["IsLogin"] == null || (bool)Session["IsLogin"] == false)
        {
            btnThoat.Visible = false;
            lblFullName.Visible = false;
        }
        else
        {
            btnThoat.Visible = true;
            lblFullName.Visible = true;
            lblFullName.Text ="Xin chào: "+ (string)Session["HoTen"];
        }
    }
    protected void btnThoat_Click(object sender, EventArgs e)
    {
        Session.Remove("IsLogin");
        Session.Remove("TaiKhoan");
        Session.Remove("HoTen");
        Session.Remove("MaNV");
        btnThoat.Visible = false;
        lblFullName.Visible = false;
        Response.Redirect("DienThoaiEmail.aspx");
    }
}
